﻿namespace Dissemination.MVC.Models
{
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Web.Mvc;

    [MetadataType(typeof(CountryMetaData))]
    public partial class Country
    {
        [Bind(Exclude = "CountryID")]
        public class CountryMetaData
        {
            [Required(ErrorMessage = "The country code is required")]
            [StringLength(2)]
            [DisplayName("Code")]
            public string CountryCode { get; set; }

            [Required(ErrorMessage = "The country name is required")]
            [StringLength(256)]
            [DisplayName("Name")]
            public string CountryName { get; set; }
        }
    }
}
